# def add_num(q,s):
#     return q+s
# def add_3_num(w,e,p):
#     return w+e+p
# 定义类
# class Cat:
#     def eat(self):
#         print('小猫爱吃鱼')
#
#     def Drink(self):
#         print('小猫要喝水')
#
#
# # 2.创建对象
# tom = Cat()
# # 3.通过对象调用说法
# tom.eat()
# tom.Drink()
# class Cat:
#     def eat(self):
#         print('self:',id(self))
#         print(f'{self.name}猫爱吃鱼')
#
#
# tom=Cat()
# print('tom:',id(tom))
# tom.name='小个'
# tom.eat()
# # black_Cat=Cat()
# print('bCat:',id(black_Cat))
#
# black_Cat.eat()
# class Dog:
#     def __init__(self,name,age):
#         self.name=name
#         self.age=age
#     def bark(self):
#         print(f'小狗{self.name},{self.age}岁汪汪汪---')
#     def __str__(self):
#         return f'姓名：{self.    name},年龄：{self.age}'
# dog=Dog('大黄',18)
# dog.bark()
# print(dog)
# class People:
#     def __init__(self, name, weight):
#         self.name = name
#         self.weight = weight
#
#     def __str__(self):
#         return f'姓名：{self.name},当前的体重为{self.weight}'
#
#     def run(self):
#         print(f'{self.name}在跑步，体重减少了0.5kg')
#         self.weight -= 0.5
#
#     def eat(self):
#         print(f'{self.name}在吃东西，体重增加了1kg')
#         self.weight += 1
#
#
# people = People('小明',75)
# print(people)
# people.run()
# people.eat()
# print(people)
# class loginPage:
#     def __init__(self,username,password,code):
#         self.username=username
#         self.password=password
#         self.code=code
#     def __str__(self):
#        return f'登录的用户名为：{self.username},密码为：{self.password},验证码为：{self.code}'
#
#
# login1=loginPage('admain','123456','8888')
# print(login1)
# class HouseItem:
#     def __init__(self,area):
#
#         self.area=area
#     def __str__(self):
#         return f'家具的名字是：,占地面积为{self.area}'
# class House:
#     def __init__(self,h_type,area):
#         self.h_type=h_type
#         self.total_area=area
#         self.item_list=[]
#         self.free_area=area
#     def __str__(self):
#         return (f'户型为：{self.h_type},总面积为：{self.total_area}平米，'
#                 f'剩余面积：{self.free_area}，家具列表名称：{self.item_list}')
#     def add_item(self,item):
#         if(self.free_area>item.area):
#             print(f'添加家具{item.name}成功')
#             self.item_list.append(item.name)
#             self.free_area-=item.area
#         else:
#             print('换个大房子吧')
#
# bed=HouseItem(4)
# chest=HouseItem(2)
# table=HouseItem(1)
# print(bed)
# print(chest)
# print(table)
# s1='1'
# class Demo:
#     def show_info(self):
#         pass
# d=Demo()
# print(dir(d))
# import random
#
# list=[random.randint(1,10) for i in range(10)]
# print(list)
# list2=[i for i in range(10) if i%2==0]
# print(list2)
# dirct={str(i):i*i for i in range(10)}
# print(dirct)
# a=2
# b=1
# num=a if a>b else b
# print(num)
#
# f=open('a.txt','w',encoding='utf-8')
# f.write('天天学系、\n')
# f.write('时间就是就是')
# f.close()
# with open('a.txt','a',encoding='utf-8') as f:
#     f.write('\nhshajhs够哦打到几点就是good')
# with open('b.txt','r',encoding='utf-8')as f:
#     while True:
#         result=f.readline()
#         # if result=='':
#         #     break
#         if not result:
#             break
#         print(result,end='')
# try:
#     num=input('请输入一个数字：')
#     num=int(num)
#     print(num)
# except:
#     print('请输入一个整数数字。')
# try:
#     num=input('请输入一个数字：')
#     # num=int(num)
#     if num.isdigit():
#         num=int(num)
#         if num%2==0:
#             print('偶数')
#         else:print('奇数')
#     else:print('输入有误')
#
#
# except ValueError:
#     print('提示输入错误')
#     # 字符串.isdigit()用来判断字符串是否都是纯数字
# except Exception as e:
#     print(e)
# finally:
#     print('程序运行结束')
# import json
# def build_data():
#     with open("login.json",encoding='utf-8') as f:
#         data=json.load(f)
#     new_list=[]
#     for d in data:
#         d.pop('desc')
#         new_list.append(tuple(d.values()))
#     return new_list
#
# print(build_data())
# def demo1():
#     num=int(input('请输入一个整数：'))
#     return num
# def demo2():
#     return demo1()
# if __name__ == '__main__':
#     print(demo2())
def  set_password():
    password=input('请输入密码（最少8位）：')
    if len(password)>=8:
        return password
    else:
        raise Exception('密码最短8位')

def add(a,b):
    return a+b











